package com.cqc.paoclient.ui.aritcle;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.cqc.paoclient.R;
import com.cqc.paoclient.adapter.Tab1FragAdapter;
import com.cqc.paoclient.base.BaseFragment;
import com.cqc.paoclient.base.BasePresenter;
import com.flyco.tablayout.SlidingTabLayout;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by cui on 2017/11/22.
 * 首页
 */

public class Tab1Frag extends BaseFragment {


    @BindView(R.id.iv_search)
    ImageView ivSearch;
    @BindView(R.id.tabLayout)
    SlidingTabLayout tabLayout;
    @BindView(R.id.viewPager)
    ViewPager viewPager;
    @BindView(R.id.toolbar)
    Toolbar toolbar;



    @Override
    protected int getLayoutId() {
        return R.layout.frag_tab_1;
    }

    @Override
    protected BasePresenter getmPresenter() {
        return null;
    }

    @Override
    protected void initView() {
        String[] titles = getResources().getStringArray(R.array.article_titles);
        Tab1FragAdapter adapter = new Tab1FragAdapter(getActivity().getSupportFragmentManager(), titles);
        viewPager.setAdapter(adapter);
        viewPager.setOffscreenPageLimit(1);
        tabLayout.setViewPager(viewPager);
        viewPager.setCurrentItem(0);
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void loadData() {

    }

    @Override
    protected void presenterSetView() {

    }

}
